package com.mt.roll.wms.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author weihongyang
 * @Date 2020/12/30 16:03
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "物料属性参数对象", description = "用于新增和更新物料属性信息")
public class MaterialAttrParam extends BaseParam {
    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "物料属性ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 物料属性名称
     */
    @ApiModelProperty(value = "物料属性名称", required = true, example = "attrName")
    @NotBlank(message = "物料属性名称不能为空")
    private String attrName;

    /**
     * 物料属性值
     */
    @ApiModelProperty(value = "物料属性值", required = true, example = "attrValue")
    @NotBlank(message = "物料属性值不能为空")
    private String attrValue;

    /**
     * 物料id
     */
    @ApiModelProperty(value = "物料id", required = true, example = "1")
    @NotNull(message = "物料ID不能为空")
    private Long materialId;



}
